public class Main {
    public static void main(String[] args) {
        Gradd gradd = new Gradd();
        Gramuti gramuti = new Gramuti();
        Thread thread = new Thread(gradd);
        Thread thread1 = new Thread(gramuti);

        thread.start();
        thread1.start();
    }
}

class Gradd implements Runnable{
    @Override
    public void run() {
        int sum = 0;
        int cnt = 1;
        while(cnt <= 10000){
            sum = sum + cnt;
            cnt++;
        }
        System.out.println("1+2+3+...+10000的结果为："+sum);
    }
}

class  Gramuti implements Runnable{
    @Override
    public void run() {
        int num = 9;
        int multiple = 10;
        while(num > 0){
            multiple = multiple * num;
            num--;
        }
        System.out.println("10!的结果为："+multiple);
    }
}
